From f6c7de277c0629f4d28637b5ee7492bd3f3db638 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Tue, 20 Mar 2007 15:15:37 +0000 Subject: [PATCH] Fix sxp2xml translation to handle maxmem. Signed-off-by: Tom Wilkie --- tools/python/xen/xm/xenapi_create.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xm/xenapi_create.py b/tools/python/xen/xm/xenapi_create.py index 4795d514da..52d91e101b 100644 --- a/tools/python/xen/xm/xenapi_create.py +++ b/tools/python/xen/xm/xenapi_create.py @@ -513,11 +513,15 @@ class sxp2xml: memory_str = str(int( get_child_by_name(config, "memory"))*1024*1024) - memory.attributes["static_min"] = memory_str + memory.attributes["static_min"] = str(0) memory.attributes["static_max"] = memory_str memory.attributes["dynamic_min"] = memory_str memory.attributes["dynamic_max"] = memory_str + if get_child_by_name(config, "maxmem"): + memory.attributes["static_max"] = \ + str(int(get_child_by_name(config, "maxmem")*1024*1024)) + vm.appendChild(memory) # And now the vbds -- 2.30.2